import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import router from './router';

// 全局请求
import http from './util/http';
Vue.prototype.$http = http;

// 全局tab
import tab from './util/tab';
Vue.prototype.$tab = tab;

import ElementUI from 'element-ui';
// 引入element-ui样式
// import 'element-ui/lib/theme-chalk/index.css';
// 引入自定义的黑色样式
import './theme/element-#161B1F/index.css';
Vue.use(ElementUI);
// 引入全局图标库
import './assets/icon/iconfont.css';

Vue.config.productionTip = false;

Vue.use(VueRouter); // 路由
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

import './perm.js' // 权限

// 全局引入组件
import HelloWorld from './components/HelloWorld.vue'
Vue.component('HelloWorld', HelloWorld)
import './components/iconSvg' // iconSvg

new Vue({
  el:'#app',
  render: h => h(App),
  router
}).$mount('#app')
